/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cc.altius.domain.mapper;

import cc.altius.model.Ambulance;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

/**
 *
 * @author sagar
 */
public class AmbulanceRowMapper implements RowMapper<Ambulance> {

    @Override
    public Ambulance mapRow(ResultSet rs, int i) throws SQLException {
      Ambulance ambulance = new Ambulance();
      ambulance.setAmbulanceId(rs.getInt("AMBULANCE_ID"));
      ambulance.setCompanyName(rs.getString("COMPANY_NAME"));
      ambulance.setContact1(rs.getString("CONTACT_1"));
      ambulance.setContact2(rs.getString("CONTACT_2"));
      ambulance.setContact3(rs.getString("CONTACT_3"));
      return ambulance;
      }
    
}
